package com.zhima.exception;

public class TaskException extends RuntimeException {
    private final String errMessage;

    public TaskException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public TaskException(ErrorCode errorCode) {
        super(errorCode.getErrorMessage());
        this.errMessage = errorCode.getErrorMessage();
    }

    public String getErrMessage() {
        return errMessage;
    }
}
